import React, { Component } from 'react';
import {Redirect} from "react-router-dom"
let isLogin = (WrapComponet)=>{
    return class extends Component {
        render(){
            let isLogin = window.localStorage.getItem("isLogin")
            console.log(isLogin,111111);
            if (isLogin == "true") {
                return <WrapComponet></WrapComponet>
            } else {
               
               return  <Redirect to="/login"></Redirect>
            }
          
        }
    }
}
export default isLogin